package cn.xx.ai4.controller;

import cn.xx.ai4.service.ChatAssistant;
import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.community.model.dashscope.WanxImageModel;
import dev.langchain4j.model.ollama.OllamaChatModel;
import dev.langchain4j.service.AiServices;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import static com.alibaba.dashscope.common.Task.ASR;

@RestController
public class AiController {
    @Resource
    ChatAssistant chatAssistant;

    /**
     * 通过 AiService
     */
    @RequestMapping("/hig")
    public String chat2(@RequestParam("memoryId") String memoryId,
                        @RequestParam("message") String message) {
        return chatAssistant.chat(memoryId, message);
    }



}
